import { Entity, PrimaryGeneratedColumn, Column, ManyToOne } from 'typeorm';
import { ArticleCategory } from './ArticleCategory';

@Entity()
export class Article {
  @PrimaryGeneratedColumn()
  id: number;

  @Column()
  title: string;

  @Column()
  content: string;
  // 多篇文章对应1个分类
  @ManyToOne(() => ArticleCategory)
  article_category: ArticleCategory;
}
